
Public Class DAOTaiKhoan
    Public Shared Function TaiKhoan_Load() As DataTable
        Return DataProvider.LoadTable("select * from TaiKhoan")
    End Function

    Public Shared Sub TaiKhoan_Insert(ByVal n As DTOTaiKhoan)
        Dim sql As String = String.Format("insert into Taikhoan values('{0}','{1}',{2})", n.Username, n.Password, n.MaNV)
        'insert into TaiKhoan values('{0}','{1}',{2})
        DataProvider.ExecuteNonQuery(sql)
    End Sub

    Public Shared Sub TaiKhoan_Update(ByVal n As DTOTaiKhoan)
        Dim sql As String = String.Format("update TaiKhoan set Username = '{0}', Password = '{1}' where MaNV = '{2}'", n.Username, n.Password,n.MaNV)
        DataProvider.ExecuteNonQuery(sql)
    End Sub
    Public Shared Sub TaiKhoan_Delete(ByVal n As DTOTaiKhoan)
        Dim sql As String = String.Format("delete TaiKhoan where Manv = '{0}'", n.MaNV)
        DataProvider.ExecuteNonQuery(sql)
    End Sub
End Class